#pragma once

#include <memory>
#include <string>

#include "stream/IOpenable.h"

namespace stream {

class Topic;

class Appender : public IOpenable {
public:

	virtual ~Appender() {}

	//TODO: ret -> binary length ???
	virtual int append(size_t index, const std::string & str) = 0;
	virtual size_t size() const = 0;

};

Appender * makeAppender(std::shared_ptr<Topic> topic);

}//end namespace stream
